using System;

 namespace QLST_DTO 
{
	 [Serializable]
	 public class NHAN_VIEN
	{
	private int maNV;
	private string hoTen;
	private int cMND;
	private DateTime ngayVaoLamViec;
	private string tenDangNhap;
	private string matKhau;
	private string soDienThoai;
	private string diaChiLienLac;
	private int maLoaiNV;
	public NHAN_VIEN()
	{}
	public NHAN_VIEN(int maNV,string hoTen,int cMND,DateTime ngayVaoLamViec,string tenDangNhap,string matKhau,string soDienThoai,string diaChiLienLac,int maLoaiNV)
	{
	this.maNV = maNV;
	this.hoTen = hoTen;
	this.cMND = cMND;
	this.ngayVaoLamViec = ngayVaoLamViec;
	this.tenDangNhap = tenDangNhap;
	this.matKhau = matKhau;
	this.soDienThoai = soDienThoai;
	this.diaChiLienLac = diaChiLienLac;
	this.maLoaiNV = maLoaiNV;
	}
	public int MaNV{
	get { return this.maNV;}
	set { if(value==null) 
		throw new Exception("maNV not allow nullvalue.");
		this.maNV=value;
	}	}
	public string HoTen{
	get { return this.hoTen;}
	set { if(value==null) 
		throw new Exception("hoTen not allow nullvalue.");
		this.hoTen=value;
	}	}
	public int CMND{
	get { return this.cMND;}
	set { if(value==null) 
		throw new Exception("cMND not allow nullvalue.");
		this.cMND=value;
	}	}
	public DateTime NgayVaoLamViec{
	get { return this.ngayVaoLamViec;}
	set { if(value==null) 
		throw new Exception("ngayVaoLamViec not allow nullvalue.");
		this.ngayVaoLamViec=value;
	}	}
	public string TenDangNhap{
	get { return this.tenDangNhap;}
	set { if(value==null) 
		throw new Exception("tenDangNhap not allow nullvalue.");
		this.tenDangNhap=value;
	}	}
	public string MatKhau{
	get { return this.matKhau;}
	set { if(value==null) 
		throw new Exception("matKhau not allow nullvalue.");
		this.matKhau=value;
	}	}
	public string SoDienThoai{
	get { return this.soDienThoai;}
	set { if(value==null) 
		throw new Exception("soDienThoai not allow nullvalue.");
		this.soDienThoai=value;
	}	}
	public string DiaChiLienLac{
	get { return this.diaChiLienLac;}
	set {this.diaChiLienLac=value;}
	}
	public int MaLoaiNV{
	get { return this.maLoaiNV;}
	set { if(value==null) 
		throw new Exception("maLoaiNV not allow nullvalue.");
		this.maLoaiNV=value;
	}	}
	public override string ToString(){
	return this.maNV+"; "+this.hoTen+"; "+this.cMND+"; "+this.ngayVaoLamViec+"; "+this.tenDangNhap+"; "+this.matKhau+"; "+this.soDienThoai+"; "+this.diaChiLienLac+"; "+this.maLoaiNV+"; ";
	}
	public override bool Equals(Object obj)
	{
	NHAN_VIEN me=(NHAN_VIEN)obj;
	bool ret=this.MaNV.Equals(me.MaNV);
	return ret;
	}
	public override int GetHashCode()
	{
	return this.MaNV.GetHashCode();
	}

	}
} 